package com.hnevc.musicsystem;

import java.util.ArrayList;
import java.util.Iterator;

public class MusicSystem {
	public ArrayList<Music> musicList;
	public void shiftTop(Music music){
		musicList.remove(music);
		musicList.add(0,music);
	}
	public void playTop(){
		musicList.get(0).play();
	}
	public void showMusic(){
		Iterator<Music> it = musicList.iterator();
	    while(it.hasNext()){
	    	Music music = it.next();
	    	System.out.println(music.name);
	    }
	    	
	}

}
